cmake_minimum_required(VERSION 2.8)
SET(CMAKE_TOOLCHAIN_FILE "hisi.cmake")
include(gpu/gpumodule.cmake)

project(compute_demo01)

SET(CMAKE_BUILD_TYPE Release)
SET(CMAKE_CXX_FLAGS "-O3 -Wall -D_LINUX -D_REENTRANT -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unknown-pragmas -std=c++11 -w -lpthread -ldl")
add_definitions("-D__ARM_NEON__=1")
set_property(SOURCE ${SRC_FILE}  APPEND_STRING PROPERTY COMPILE_FLAGS "-mfpu=neon")

include_directories( ${PROJECT_SOURCE_DIR}/gpu/include 
                      ${PROJECT_SOURCE_DIR}/include/CL_2_1 
                      ${OpenCV_INCLUDE_DIRS})
link_directories( ${PROJECT_SOURCE_DIR}/lib ${OpenCV_LIBS_DIRS})


LIST(APPEND LINK_LIBS 
    -lmali
    -lOpenCL
    ${OpenCV_LIBS}
)

LIST(APPEND SOURCEFILES 
    ${PROJECT_SOURCE_DIR}/src/demo01.cpp 
)

add_executable(gpu_demo01 ${SOURCEFILES})
target_link_libraries(gpu_demo01 ${LINK_LIBS} )
